/*************************************************
 *FileName:      用户协议.js
 *Description:   useragrre.js
 *Others:        陈灿
 *************************************************/
    /*
     * 启动
     */
    mui.init();
    mui('.mui-scroll-wrapper').scroll({
        indicators: false,      //是否显示滚动条 默认为true
        deceleration: 0.003,    //阻尼系数,系数越小滑动越灵敏 默认0.0006
        bounce: true           //是否启用回弹 默认true
    });
    /*
     * 变量初始化
     */
    var that =getUrlParam('that');
    /*
     * 主程序
     */ 
    $(document).ready(function() 
    {
        //样式加载
        pagecss();
    });
    /**
     * pagecss
     * 样式加载
     * @cc 
     * @DateTime 2018-01-08T06:19:16+0800
     * @param    int        
     * @return   void
     */
    function pagecss(){
        if(that=='agency'){
            $('.mui-title').text('代理协议');
            $('.title').text('换一批《代理协议》')
            var name ='agent_agreement';
        }else if(that=='handler'){
            $('.mui-title').text('经理人协议');
            $('.title').text('换一批《经理人协议》')
            var name ='manager_agreement';
        }else if(that=='convert'){
            $('.mui-title').text('兑换协议');
            $('.title').text('换一批《兑换协议》')
            var name ='exchange_agreement';
        }else if(that=='withdraw'){
            $('.mui-title').text('提现协议');
            $('.title').text('换一批《提现协议》')
            var name ='present_agreement';
        }else{
            $('.mui-title').text('用户协议');
            $('.title').text('换一批《用户协议》')
            var name ='user_protocol';
        }
        $.ajax({
            type: "post",
            url: DOMAIN_NAME + "/index.php/api/user/agreement",
            dataType:'jsonp',
            data: { name:name,},
            success: function(data) {
                if(data.error_code == 0){
                    $('.text').html(data.data)
                }else{
                    
                }
                
            }
        })
    }
    
    
